﻿@{
    ViewBag.Title = "Accordion";
}

<h3>Example:</h3>
@{
    Html.MVCUI()
         .Accordion()
         .Name("accordion")
         .Items((it) =>
         {
             it.Name("Title1")
             .Content(@<text>Some pure text</text>);

         }).Items((it) =>
         {
             it.Name("Title2")
                 .Content(@<table border="0" cellpadding="0" cellspacing="0">
                     <tr>
                         <td>
                            Render a table inside the accordion
                         </td>
                     </tr>
                 </table>);
         }).Items((it) =>
         {
             it.Content(@<text>@Content()</text> )
             .Name("Long Content");
         })
         .Render();
}   

<div style="margin-bottom:30px"> </div>
<h3>Code View:</h3>

        @{Html.MVCUI()
            .WebTab()
            .Name("tb").Items((it) =>
            {
                it.Content(@<pre name="code"  class="c-sharp"> @SnippetHelper.RenderSnippet("snippets","Accordion")</pre>).Name("Razor");

            }).Items((it) =>
            {
                it.Content(@<text>teadl</text>).Name("Server");

            }).Render();
        }


        @helper Content()
        {
            @(new HtmlString("  Contrary to popular belief,Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source."))    
        }


<script language="javascript">
    dp.SyntaxHighlighter.ClipboardSwf = '/flash/clipboard.swf';
    dp.SyntaxHighlighter.HighlightAll('code');
</script>